# -*- coding: utf-8 -*-

from osv import fields,osv
from osv.orm import browse_record
import tools
from functools import partial
import pytz
import pooler
from tools.translate import _
from service import security
import netsvc
import datetime

class aas_news_users(osv.TransientModel):
    _name = 'aas.news.users'
    _columns = {
        'users_ids': fields.many2many('res.users', 'aas_news_users_users', 'news_user_id', 'user_id', string='', readonly=True),
    }
    
    def default_get(self, cr, uid, fields, context=False):
        res = super(aas_news_users, self).default_get(cr, uid, fields, context=context)
        id = context.get('active_id', False)
        if id:
            news_obj = self.pool.get('aas.news')
            news = news_obj.browse(cr, uid, id, context=context)
            res.update({'users_ids': news.users})
        return res
    
aas_news_users()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
